import 'dart:convert';

import 'package:flutter/services.dart';

import '../../entity/articel/xmm_article_info.dart';

class XmmLocalRepository {
  Future<List<XmmArticleInfo>> getArticleList() async {
    var dataJson = await rootBundle.loadString('assets/images/find/datas.json');
    var jsonInfo = jsonDecode(dataJson);
    var list = <XmmArticleInfo>[];
    for (var item in jsonInfo) {
      list.add(XmmArticleInfo.fromJson(item));
    }
    return list;
  }
}
